<?php
echo '<script type="text/javascript">';
require APP . WEBROOT_DIR . DS . "js" . DS . "validate" . DS . "employee_add.js";
echo '</script>';
?>
<div class="employees form">
<?php echo $this->Form->create('Employee');?>
	<fieldset>
		<legend><?php __('Agregar Empleado'); ?></legend>
	<?php
		echo $this->Form->input('first_name', array('label'=>'Nombre'));
		echo $this->Form->input('last_name', array('label'=>'Apellido'));
		echo $this->Form->input('dni', array('label'=>'Dni'));
		echo $this->Form->input('phone_number', array('label'=>'Teléfono'));
		echo $this->Form->input('address', array('label'=>'Dirección'));
		echo $this->Form->input('birthday', array('type' => 'text', 'label' => __('Fecha de nacimiento', true)));
	?>
	</fieldset>
<?php echo $this->Form->end(__('Crear', true));?>
</div>
<script type="text/javascript" defer>
    (function($){
        // Date picker
        $("#EmployeeBirthday").datepicker({
            yearRange: '1970:2010',
            defaultDate: new Date(1985, 1 - 1, 1),
            dateFormat: 'dd/mm/yy',
            changeMonth: true,
            changeYear: true
        });
        
    })(jQuery);
</script>